package com.example.demo.mapper;

import com.example.demo.pojo.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-01-07
 * Time: 11:29
 */
@Mapper
public interface ArticleMapper {
    List<Article> getArticleByUser(String username);

    List<Article> getArticleList(@Param("id") Integer id);


    Article getArticleDetails(@Param("id") Integer id);

    int updateArticle(@Param("aid")Integer aid, @Param("uid")Integer uid, @Param("title")String title, @Param("content")String content);

    int deleteAricle(@Param("aid")Integer aid);

    List<Article> getList(@Param("psize") Integer psize, @Param("offset") Integer offset);

    int getCount();

    int addArticle(@Param("uid")Integer uid, @Param("title")String title, @Param("content")String content);
}
